/***********************************************************************
 * Module:  Reference.java
 * Author:  Stefan
 * Purpose: Defines the Class Reference
 ***********************************************************************/

package org.dslintegration.merge.km3.core;


public class Reference extends StructuralFeature {
	public boolean isContainer;
	public Reference opposite;

	public Reference(){
		
	}
	
	public Reference(String name, Classifier type) {
		this.name = name;
		this.type = type;
		this.lower = 0;
		this.upper = 1;
		this.isContainer = false;
	}

	public Reference(String name, Classifier type, int lowerBound, int upperBound) {
		this.name = name;
		this.type = type;
		this.lower = lowerBound;
		this.upper = upperBound;
		this.isContainer = false;
	}

	public boolean isContainer() {
		return isContainer;
	}

	public void setContainer(boolean isContainer) {
		this.isContainer = isContainer;
	}

	public Reference getOpposite() {
		return opposite;
	}

	public void setOpposite(Reference opposite) {
		this.opposite = opposite;
	}

	@Override
	public String toString() {
		return "\n\t\t\tReference [isContainer=" + isContainer + ", opposite=" + (opposite != null ? opposite.getName() : "None") + ", name"+this.getName()+"]";
	}

	

}